<?php
use shenka\assets\AppAsset;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use yii\widgets\ActiveForm;

$controller = '星球大冒险（中）&美术棒';
$action = '注册统计';
?>
	

<!-- /section:settings.box -->
<div class="page-header">
	<h1>
		<?php echo $controller;?>
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			<?php echo $action;?>
		</small>
	</h1>
</div><!-- /.page-header -->
<div class="col-xs-12">
	<div class="tabbable">
		<ul class="nav nav-tabs" id="myTab">
			<li class="active">
				<a data-toggle="tab" href="#home">
					<i class="green ace-icon fa fa-flag bigger-120"></i>
					按日
				</a>
			</li>

			<li>
				<a data-toggle="tab" href="#messages">
					<i class="red ace-icon fa fa-flag bigger-120"></i>
					按周
				</a>
			</li>

			<li class="dropdown">
				<a data-toggle="tab" href="#dropdown">
					<i class="blue ace-icon fa fa-flag bigger-120"></i>
					按月
				</a>

			</li>

			<li class="dropdown">
				<a data-toggle="tab" href="#dropdown1">
					<i class="orange ace-icon fa fa-flag bigger-120"></i>
					按时段
				</a>
			</li>
		</ul>

		<div class="tab-content">
			<div id="home" class="tab-pane fade in active">
				<!-- 按日注册量 -->
				<input type="hidden" id="hidden" value='<?= $reg ?>' />
				<input type="hidden" id="hidden-2" value='<?= $sum ?>' />
				<div id="reg" style="width:1000px;height:500px;margin:50px auto;"></div>
				<!-- echarts settings handler -->

				
				<script type="text/javascript" src="../../build/info/reg.js"></script>

			</div>

			<div id="messages" class="tab-pane fade">
				<!-- 按周注册量 -->

				<input type="hidden" id="w-hidden" value='<?= $wreg ?>' />
				<div id="wreg" style="width:1000px;height:500px;margin:50px auto;"></div>
				<!-- echarts settings handler -->
				
				<script type="text/javascript" src="../../build/info/wreg.js"></script>		
			</div>

			<div id="dropdown" class="tab-pane fade">
				<!-- 按月注册量 -->
				<input type="hidden" id="m-hidden" value='<?= $mreg ?>' />
				<input type="hidden" id="m-hidden-2" value='<?= $msum ?>' />
				<div id="mreg" style="width:1000px;height:500px;margin:50px auto;"></div>
				<!-- echarts settings handler -->
				
				<script type="text/javascript" src="../../build/info/mreg.js"></script>
				
			</div>

			<div id="dropdown1" class="tab-pane fade">

				
				<div class="input-group col-sm-4 col-md-offset-3 col-md-5">
					<input class="form-control date-picker" id="id-date-picker-1" type="text" data-date-format="yyyy-mm-dd" value="<?php echo date('Y-m-d',time());?>"/>
					<span class="input-group-addon">
						<i class="fa fa-calendar bigger-110"></i>
					</span>
				</div>				
				<input type="hidden" id="hidden" >
				<div id="hreg" style="width:1000px;height:500px;margin:50px auto;"></div>
				<script type="text/javascript" src="../../build/info/dayreg.js"></script>

			</div>
		</div>
	</div>
</div>
<script src="../../ace/js/jquery.js"></script>
<script src="../../ace/js/date-time/bootstrap-datepicker.js"></script>

<script type="text/javascript">
	$('.date-picker').datepicker({
		autoclose: true,
		todayHighlight: true
	});
	$(document).ready(function(){
		var re = $('.data-picker').val();
		$.ajax({
			type: 'post',
			url: '<?= Url::to(['common/hreg'])?>',
			data: {_csrf:'<?= Yii::$app->request->csrfToken?>',time:re},
			success:function(response){
				ecr(response);
			}
		});
	});
	$('.date-picker').change(function(){
		var re = $(this).val();
		$.ajax({
			type: 'post',
			url: '<?= Url::to(['common/hreg'])?>',
			data: {_csrf:'<?= Yii::$app->request->csrfToken?>',time:re},
			success:function(response){
				
				ecr(response);
			}
		});
	});
</script>
